from datetime import datetime

from config.database import Base
from sqlalchemy import Column, Integer, String, DateTime


class KylinFutureStrategyParam(Base):
    """
    期货策略参数表
    """

    __tablename__ = 'kylin_future_strategy_param'
    id = Column(Integer, primary_key=True, autoincrement=True, comment='参数id')
    strategy_instance = Column(String(50), nullable=False, comment='策略实例名称')
    param_name = Column(String(50), nullable=False, comment='参数名称')
    param_value = Column(String(200), default=None, comment='参数值')
    create_time = Column(DateTime, default=datetime.now, comment='创建时间')
    update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')